<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page import="com.goodedeeds.webapp.controller.VendorAction" %>
<%@ page import="com.goodedeeds.webapp.controller.ResourcePageAction" %>
<%@ page import="com.goodedeeds.domain.IVendor" %>
<%--@elvariable id="actionBean" type="com.goodedeeds.webapp.controller.VendorAction"--%>
<%@ include file="/WEB-INF/jsp/include/taglibs.jsp"%>
<div style="text-align: center; font-size: 1.5em;">View Vendor</div>
<div>Vendor Key: ${actionBean.vendor.vendorKey}</div>
<div>Vendor Id: ${actionBean.vendorId}</div>
<div>Vendor Name: ${actionBean.vendor.vendorName}</div>
<div>Vendor Description: ${actionBean.vendor.vendorDescription}</div>
<div>Preview Text: ${actionBean.vendor.previewHtml}</div>
<div>Vendor Created Date: ${actionBean.vendor.createdDate}</div>
<div>Vendor Modified Date: ${actionBean.vendor.modifiedDate}</div>
<div>Vendor Status: ${actionBean.vendor.vendorStatus}</div>
<c:if test="${!empty actionBean.vendor.vendorCategories}">
    <div>
        Vendor Categories
        <c:forEach items="${actionBean.vendor.vendorCategories}" var="category">
            <div>${category.categoryName}</div>
        </c:forEach>
    </div>
</c:if>

<div>
    <stripes:link href="<%=VendorAction.URL%>" event="edit">
        <stripes:param name="vendorId" value="${actionBean.vendor.vendorId}"/>
        Edit
    </stripes:link> |
    <stripes:link href="<%=ResourcePageAction.URL%>" event="list">
        <stripes:param name="pageResourceType" value="<%=IVendor.RT_VENDOR%>"/>
        <stripes:param name="pageResourceId" value="${actionBean.vendor.vendorId}"/>
        Pages
    </stripes:link>
</div>